<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="sdh" author="宋典花">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/css/style.css">
    <script src="/js/jquery-2.0.3.js"></script>
    <title>我的首页</title>
    <style>
        .btn, .btn2 {
            height: 30px;
            width: 80px;
            background-color: #00abef;
            border: solid 1px #00abef;
            color: white;
            font-size: 18px;
        }

        h1 {
            color: #00abef;
        }

        form input {
            margin-bottom: 15px;
            border: solid 1px #00abef;
        }

        form textarea {
            margin-bottom: 15px;
            border: solid 1px #00abef;
        }

        #content .title {
            margin-left: 94px;
            color: deepskyblue;
            font-size: 20px;
            font-weight: bold;
        }

        #content .title a {
            color: deepskyblue;
        }

        #content {
            border-bottom: solid 1px #cdcdcd;
            margin: 10px 0;
        }

        #content .img {
            float: left;
            margin-top: -40px;
        }

        #content .name {
            margin-left: 94px;
            color: deeppink;
        }

        #content .time {
            color: #aaa;
            float: right;
        }

        #content .img {
            height: 64px;
            width: 64px;
            border-radius: 50%;
        }

        #post {
            margin-left: 94px;
        }
    </style>
</head>
<body>
<header>
    <h1><%= title %></h1>
</header>

<nav>

    <span><a href="/" title="主页">主页</a></span>
    <span><a href="/archive">存档</a></span>
    <span> <a href="/tags">标签</a></span>
    <% if (user) { %>
    <span><a href="/post">发布</a></span>
    <span><a href="/upload">头像</a></span>
    <span><a href="/logout">退出</a></span>
    <% } else { %>
    <span><a href="/login" title="登录">登录</a></span>
    <span><a href="/reg" title="注册">注册</a></span>
    <% } %>
    <!--新增搜索功能-->
<span>
    <form action="/search" method="get">
        <input type="text" name="keyword" placeholder="SEARCH" class="search"/>
    </form>
</span>
</nav>
<article>
    <% if (success){ %>
    <div><%= success %></div>
    <% } %>

    <% if (error){ %>
    <div><%= error %></div>
    <% } %>
